package com.example.demo.mapper;

import com.example.demo.pojo.dbItems;
import com.example.demo.pojo.dbRole;
import com.example.demo.vo.Result;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ItemsMapper {

    @Select("select * from db_items")
    List<dbItems> selectAll();

    dbItems selectItemById(Integer id);

    Integer add(dbItems item);

    void update(dbItems items);

    @Delete("delete from db_items where ID=#{id}")
    Integer delete(Integer id);

    List<dbItems> selectByRole(dbRole dbRole);
}
